<html>
<head>
<STYLE>
<!--
body, table, tr, td {font-size: 12px; font-family: Verdana, MS sans serif, Arial, Helvetica, sans-serif}
td.index {font-size: 10px; color: #000000; font-weight: bold}
td.empty {font-size: 10px; color: #000000; font-weight: bold}
td.dt_string {font-size: 10px; color: #000090; font-weight: bold}
td.dt_int {font-size: 10px; color: #909000; font-weight: bold}
td.dt_float {font-size: 10px; color: #007000; font-weight: bold}
td.dt_unknown {font-size: 10px; background-color: #f0d0d0; font-weight: bold}
td.empty {font-size: 10px; background-color: #f0f0f0; font-weight: bold}
-->
</STYLE>
</head>
<body text="#000000" link="#000000" vlink="#000000" alink="#000000" topmargin="0" leftmargin="100" marginwidth="0" marginheight="0">
<table width="100%" align="center" bgcolor="#006699">
<tr>
	<td>&nbsp;</td>
	<td width="60%"><font color="#FFFFFF" size="+2">IDM Adwords Tools</font></td>
	<td width="40%" align="right"><font color="#FFFFFF" size="+1"></font></td>
	<td>&nbsp;</td>
</tr>
</table>
<div align="center" style="padding-top:20px;" size="+1">
		<b>Thanks, data exported  is successfully.</b>
		<br><a href="index.php">Export again</a> | <a href="download.php">Download csv</a>
</div>
</body></html>
<?php
	include_once ("include/includes.inc");
	$data_csv[]= array('Name','Email','Company','Zipcode','Phone','Country', 'City','Address','Saleman');
	//echo "<pre>"; print_r($data_csv); echo "</pre>";		
	$content = array_to_csv($data_csv);	
		
	$mime = 'text/csv, application/csv, application/excel, application/vnd.ms-excel, application/vnd.msexcel, text/anytext' ;
	$encoding = 'binary';
	//$filename=date("d-m-Y H:i").'_dealerlist';	
	header('Pragma: public');
	header('Expires: 0');
	header('Content-Description: File Transfer');
	header('Content-Type: application/csv');
	header('Content-Transfer-Encoding: ' . $encoding);
	header('Content-Disposition: attachment; filename=' . date("Y-m-d") .'_adwords.csv');
	header('Content-Length: ' . strlen($content));
			
	ob_start();
	echo $content;
	ob_end_flush();
?>